// declare variale in Logo State
int m_iLogoPosX = SCREEN_W >> 1;
int m_iLogoPosY = SCREEN_H >> 1;

Image m_imgLogo;

//count time for changing state
long m_lLogoStartTime = 0;
long m_lLogoCurrentTime = 0;
long lLogoSleepingTime = 3000; //3 seconds

 void UpdateLogo(int mode)
{
	if (mode == UpdateType.UPDATE)
	{
		try
		{
			m_lLogoCurrentTime = System.currentTimeMillis();		
		}
		catch(Exception e)
		{
		}
		if ((m_lLogoCurrentTime - m_lLogoStartTime) > lLogoSleepingTime)
		{
			SwitchState(GameState.Loading);
		}
	} 
	if (mode == UpdateType.PAINT)
	{
		s_g.setColor(0);
		s_g.fillRect(0, 0, SCREEN_W, SCREEN_H);
		if(m_imgLogo != null)
			s_g.drawImage(m_imgLogo, m_iLogoPosX, m_iLogoPosY, Graphics.HCENTER | Graphics.VCENTER);
	}
	if (mode == UpdateType.CTOR)
	{
		try
		{
			m_imgLogo = Image.createImage("/bg_logo.png");				
			m_lLogoStartTime = System.currentTimeMillis();
		}
		catch (Exception e)
		{
			System.out.println("e::::::::::::: " + e.getMessage());
		}
	}
	
}
